home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / fix101ky.zip / SNOOP.ASM < prev   
Assembly Source File  |  1988-07-24  |  1KB  |  40 lines

  1. .286
  2. Sseg          segment byte stack 'prog'    ; dummy stack segment
  3. Sseg          ends
  4.  
  5.  
  6. Cseg          segment byte public 'prog'
  7.               assume  cs:Cseg, ds:Cseg, ss:Sseg
  8.  
  9.               org     100h
  10.  
  11. MAIN          proc    far
  12.               mov     ax,3515h          ; get vector for int 15h (cassette)
  13.               int     21h
  14.               mov     VOFS,bx
  15.               mov     VSEG,es
  16.               mov     dx,offset Intrpt
  17.               mov     ax,2515h          ; set vector for INT 15h (cassette)
  18.               int     21h
  19.               mov     dx,0020h          ; plenty of space
  20.               mov     ax,3100h          ; terminate and stay resident
  21.               int     21h
  22. MAIN          endp
  23.  
  24.  
  25. VOFS    dw ?
  26. VSEG    dw ?
  27.  
  28. Intrpt        proc    far
  29.               push    ds                    ; save DS
  30.               push    0B000h                ; mono video segment
  31.               pop     ds                    ; put it in DS temporarily
  32.               mov     ds:[0],al             ; stuff scan code in video memory
  33.               mov     byte ptr ds:[1],7     ; make sure it's readable
  34.               pop     ds                    ; restore DS
  35.               jmp     dword ptr cs:VOFS     ; go handle key normally
  36. Intrpt        endp
  37.  
  38. Cseg          ends
  39.               end            MAIN
  40.